package org.gpp.proj1.util.test;

import com.jme.system.DisplaySystem;
import com.jme.system.JmeException;

public class JMETestDisplayManager {
	private static boolean initialized;
	
	private JMETestDisplayManager() {
		throw new UnsupportedOperationException("This class cannot be instantiated.");
	}
	
	public static void initJME() {
		if( initialized ) {
			return;
		}
		
		initDisplay();
		initialized = true;
	}

	private static void initDisplay() {

		DisplaySystem display = DisplaySystem.getDisplaySystem( "LWJGL" );
		try {
			display.createWindow( 640, 480, 16, 60, false );
		} catch( JmeException e ) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}
